Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@polkadot/networks
Advanced tools
A list of all available Substrate networks and their applicable prefixes
@polkadot/networks is a utility package that provides information about various networks in the Polkadot ecosystem. It includes details such as network names, prefixes, and other relevant metadata.
Get Network Information
This feature allows you to retrieve information about a specific network in the Polkadot ecosystem. In this example, we fetch details about the Polkadot network.
const { knownSubstrate } = require('@polkadot/networks');
const networkInfo = knownSubstrate.find(network => network.network === 'polkadot');
console.log(networkInfo);
List All Networks
This feature allows you to list all available networks in the Polkadot ecosystem. The code sample demonstrates how to extract and print the names of all networks.
const { knownSubstrate } = require('@polkadot/networks');
const allNetworks = knownSubstrate.map(network => network.network);
console.log(allNetworks);
Get Network Prefix
This feature allows you to retrieve the prefix of a specific network. In this example, we fetch the prefix for the Kusama network.
const { knownSubstrate } = require('@polkadot/networks');
const networkPrefix = knownSubstrate.find(network => network.network === 'kusama').prefix;
console.log(networkPrefix);
A list of all available Substrate networks and their applicable prefixes.
This list is periodically checked against the master list available at https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json
10.4.2 Feb 19, 2023
Contributed:
Changes:
u8aToU8a
correctly unwraps Buffer value (check ordering)FAQs
A list of all available Substrate networks and their applicable prefixes
The npm package @polkadot/networks receives a total of 75,057 weekly downloads. As such, @polkadot/networks popularity was classified as popular.
We found that @polkadot/networks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.